package com.sales.service.view;

import com.sales.service.R;

import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

/**
 * this activity is used to display more information regarding the previous activities data.
 * 
 * @author Sega
 *
 */
public class OpportunityInfoActivity extends BaseActivity {

	/**
	 * Strings declared for the debugging process.
	 */
	private static final String TagProject = "SalesService";
	private static final String TagPage = "OpportunityInfo ::";

	private EditText edittxtOpprName;

	/* (non-Javadoc)
	 * @see com.sales.service.view.BaseActivity#onCreate(android.os.Bundle)
	 * 
	 * the layout is set.
	 * the header content is set.
	 * the data display is made.
	 */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.opportunityinfo_layout);
		Log.i(TagProject, TagPage);

		setHeaderContent();

		displayContent();

	}

	/**
	 * Header content is set.
	 */
	private void setHeaderContent() {
		Button btnLeft = (Button) findViewById(R.id.btnLeft);
		btnLeft.setVisibility(View.VISIBLE);

		Button btnRight = (Button) findViewById(R.id.btnRight);
		btnRight.setVisibility(View.INVISIBLE);

		TextView txtTitle = (TextView) findViewById(R.id.txtTitle);
		txtTitle.setText("Opportunity Detail");
	}

	/**
	 * the data is displayed in the UI
	 */
	private void displayContent() {
		Bundle extras = getIntent().getExtras();

		edittxtOpprName= (EditText) findViewById(R.id.edttxtOpprName);
		edittxtOpprName.setText(extras.getString("1"));
	}

}
